package com.enjava.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.enjava.Alumno;
import com.enjava.Servicio;

@Controller
public class Controlador {
	
	
	
	@Autowired
	Servicio servicio;
	
	
	
    @RequestMapping("/helloWorld")
    public String helloWorld(Model model) {
     
        return "helloWorld";
    }
    @RequestMapping("/adiosWorld")
    public String adiosWorld(Model model) {
        model.addAttribute("message2", "Adios World!");
        
        return "adiosWorld";
    }
    @RequestMapping("/saludando")
    public String saluda(Model model) {
        model.addAttribute("message3", servicio.dameSaludo());
        
        return "saludando";
    }

}
